A virtual tape device is a device which virtually performs a tape operation on a large-scale storage device, such as a hard disk and the like. Data of a tape image is arranged as logical volumes (LVs) on the large-scale storage device to eliminate operations of mounting, loading, and unloading a tape, which are performed by hardware, and increase the operation speed.
In a virtual tape device, a tape volume cache (TVC) is used to handle data as virtual volumes. As the TVC, for example, a redundant array of inexpensive disks (RAID) is used. Tape volumes accessed from an upper host device are stored in the TVC. This volume data is called LV data.
A data write operation performed by a virtual tape device will be described with reference to FIG. 13. FIG. 13 is a diagram illustrating a data write operation performed by a typical virtual tape device. As illustrated in FIG. 13, the virtual tape device includes virtual library processors (VLPs) VLP0 and VLP1, integrated channel processors (ICPs) ICP0 and ICP1, a physical library processor (PLP) PLP0, integrated device processors (IDPs) IDP0 and IDP1, and a NC. The VLPs control the entire virtual tape device. The ICPs are connected to a host device and control transmission of LV data stored in the TVC and reception of LV data to be stored in the NC. The function of a virtual drive is performed by the ICPs. The PLP controls a back-end tape library device. The IDPs control drives (DRIVE0 and DRIVE1) of the back-end tape library device.
The back-end tape library device connected to the virtual tape device includes a controller and a disk. The disk is a storage that actually stores data therein. Software for realizing similar functions to those of a robot, drives, and physical volumes (PVs) indicating media (physical tapes) is installed in the controller. That is, the tape library device is a device that emulates functions of the robot, the drives, and the PVs.
The virtual tape device stores LV data written by the host device in the TVC, and then, writes the LV data in PV (which is in fact a disk) of the tape library device. The processing of writing the LV data stored in the TVC into the PV is referred to as “migration”.
In migration processing performed when LV data is updated due to a write operation of the LV data by the host device, the virtual tape device invalidates old data having been written in PV in the tape library device before the update. Then, the virtual tape device adds and writes new data at the end of the PV. When this operation is repeated, invalid areas are increased in the PV, and thus, free areas run out. Therefore, the virtual tape device changes the PV in which the free areas are running out to another PV to continue the write operation of the LV data. Thus, the use efficiency of PV is reduced, and reduction in the free capacity of the PV is caused.
In order to deal with such a situation, the virtual tape device takes out only valid LV data stored in a PV (referred to as a movement source PV), rearranges the took out LV data in another PV (referred to as a movement destination PV), and initializes the movement source PV. Rearranging the LV data stored in a PV is referred to as “reorganization”. FIG. 14 is a diagram illustrating reorganization of a physical volume.
FIG. 14 illustrates PVs PV0003, PV0004, and PV0005, and LVs LV001, LV002, LV003, and LV004. As illustrated in FIG. 14, in the PV0003, when the LV002 is updated, data of the LV002 having been written in the PV0003 before the update is invalidated, and new data is added and written at the end of the PV0003. In the PV0004, when the LV001 is updated, data of the LV001 having been written in the PV0003 before the update is invalidated and new data is added and written in the PV0004. When the LV004 is updated, data of the LV004 having been written in the PV0004 before the update is invalidated and new data is added and written in the PV0004. Then, after reorganization, the LV data having been stored in each of the PV0003 and the PV0004 is rearranged in the PV0005, and the original PVs are initialized. Thus, fragmentation of the free areas in PVs is reduced, and the free capacity of PVs may be ensured.
There are two patterns of the operation of reorganization processing. A first pattern is an operation performed when LV data (referred to as target LV data) to be reorganized is on the TVC. In this case, the virtual tape device writes the target LV data on the NC into a PV in the tape library device, and then, updates a PV management table used for managing PVs.
FIG. 15 is a diagram illustrating a sequence of typical reorganization processing of a virtual tape device in the first pattern. As illustrated in FIG. 15, the VLP0 of the virtual tape device instructs the PLP0 to mount a movement destination PV in which the target LV data is reorganized (S101). The PLP0 controls a robot serving as a conveyance mechanism to mount the movement destination PV (S102). When the PLP0 receives a mount completion notice from the robot (S103), the PLP0 notifies the VLP0 of the completion of the mounting (S104). After the mounting is completed, the VLP0 instructs the IDP0 to write target LV data stored in the NC to the movement destination PV (S105). The IDP0 controls the DRIVE0 to execute a write operation (S106). When the IDP0 receives a write completion notice from the DRIVE0 (S107), the IDP0 notifies the VLP0 of the completion of the write operation (S108). Thus, valid target LV data stored in a PV is rearranged in another PV. Note that, in this case, an example in which the IDP0 is operated has been described, but another IDP may be operated. After the write operation to the movement destination PV is completed, the VLP0 instructs the PLP0 to demount the movement destination PV (S109). The PLP0 controls the robot to demount the movement destination PV (S110). When the PLP0 receives a demount completion notice from the robot (S111), the PLP0 notifies the VLP0 of the completion of the demounting (S112). After the demounting is completed, the VLP0 updates the PV management table so as to delete an identification name (referred to as an LV name) of an LV corresponding to the target LV data, which is stored in the PV management table in association with an identification name (referred to as a PV name) of the movement source PV (S113). Thus, reorganization processing is ended.
A second pattern of the operation of reorganization processing is an operation performed when the target LV data is not on the TVC. In this case, the virtual tape device reads the target LV data from the tape library device and stores the read target LV data in the TVC, and then, writes the target LV data stored in the TVC into a PV of the tape library device. Thereafter, the virtual tape device updates the PV management table.
FIG. 16 is a diagram illustrating a sequence of typical reorganization processing of a virtual tape device in the second pattern. As illustrated in FIG. 16, the VLP0 of the virtual tape device instructs the PLP0 to mount a movement source PV whose data is to be reorganized (S121). The PLP0 controls a robot to mount the movement source PV (S122). When the PLP0 receives a mount completion notice from the robot (S123), the PLP0 notifies the VLP0 of the completion of the mounting (S124). After the mounting is completed, the VLP0 instructs the IDP1 to read target LV data from the movement source PV (S125). The IDP1 controls the DRIVE1 to execute a read operation (S126). When the IDP1 receives a read completion notice from the DRIVEL (S127), the IDP1 notifies the VLP0 of the completion of the read operation (S128). Note that, in this case, an example in which the IDP1 is operated has been described, but another IDP may be operated. After the read operation from the movement source PV is completed, the VLP0 instructs the PLP0 to demount the movement source PV (S129). The PLP0 controls the robot to demount the movement source PV (S130). When the PLP0 receives a demount completion notice from the robot (S131), the PLP0 notifies the VLP0 of the completion of the demounting (S132). After the demounting is completed, the VLP0 executes the operation of reorganization processing that is to be performed when the target LV data is on the TVC (S101-S113). This processing is as illustrated in FIG. 15, and therefore, the description thereof will be omitted. Thus, reorganization processing is ended.
Related techniques are disclosed, for example, in Japanese Laid-open Patent Publication No. 2012-98965 and Japanese Laid-open Patent Publication No. 2007-323589.
However, typical reorganization processing has a problem in which the processing speed is reduced. That is, in reorganization processing, when the tape library device is a device that emulates a physical tape, the operations of mounting, demounting, and accessing PV are performed, and thus, the processing speed is reduced.